from flask_restful import fields  # type: ignore

from libs.helper import GenderField, TimestampField
from .robots_fields_def import base_rob_extra_info_fields
robot_user_fields = {
    "id": fields.String,
    "name": fields.String,
    "phone": fields.String,
    "email": fields.String,
    "Gender": GenderField,
    "gender": fields.Integer,
    "is_password_set": fields.Boolean,
    "is_admin_or_owner": fields.Boolean,
    "last_login_at": TimestampField,
    "last_active_at": TimestampField,
    "created_at": TimestampField,
    "roles": fields.List(fields.String),
    "open_id": fields.String,
    "status": fields.String,
    "interface_language": fields.String,
    "timezone":fields.String,
    "robot_extra_infos":fields.List(fields.Nested(base_rob_extra_info_fields)),
}

robot_user_list_fields = {
    "data": fields.List(fields.Nested(robot_user_fields)),
    "total": fields.Integer,
    "has_more": fields.Boolean,
    }